/** 查询参数 */
/** 登录token的请求参数 */
export type LoginParams = {
  username: string
  password: string
  grant_type: string
  scope: string
}

/** 请求结果 */
/**  登录，获取token和refresh_token的结果需要特殊转换 */
export type LoginResult = {
  sub: string
  clientId: string
  iss: string
  token_type: string
  access_token: string
  refresh_token: string
  aud: string[]
  license: string
  exp: string
  expires_in: string
  iat: string
  jti: string
  userName: string
}

/** 定义拥有token和用户信息的整体对象  */
export type UserTokenInfo = {
  access_token?: string
  refresh_token?: string
  userName?: string
  isLogin?: boolean
  basicAuth?: string
  avatar?: string
  phone?: string
  email?: string
}

/**  登录后用户信息 */
export type UserInfoResult = {
  nickname: string
  username: string
  avatar: string
  phone: string
  email: string
}

// 用户信息
export type UserInfo = {
  userId: string
  username: string
  phone: string
  avatar: string
  nickname: string
  name: string
  email: string
}

// 定义用户接口
export type ClockUserInfo = {
  name: string
  alias: string
  level: string
  totalGrade: string
  avatar: string
}

export type RegisterParams = {
  username: string
  password: string
  phone: string
  // checked: boolean
}
